//
//  ST_MatchFaceLoadingController.swift
//  btvideo
//
//  Created by mac on 2020/3/18.
//  Copyright © 2020 JarvanZhang. All rights reserved.
//

import UIKit
import SwifterSwift
import SnapKit

/**
 匹配人脸ing
 */
class ST_MatchFaceLoadingController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        view.backgroundColor = .clear
        
        view.addSubview(root_view)
        root_view.snp.makeConstraints { (make) in
            make.center.equalToSuperview()
            make.width.height.equalTo(210)
        }
        
        root_view.addSubview(imageView)
        imageView.snp.makeConstraints { (make) in
            make.edges.equalToSuperview().inset(UIEdgeInsets.init(top: 43, left: 53, bottom: 64, right: 53))
        }
        
        root_view.addSubview(sub_label)
        sub_label.snp.makeConstraints { (make) in
            make.centerX.equalToSuperview()
            make.bottom.equalToSuperview().offset(-32)
        }
    }
    
    
//    MARK:
    fileprivate lazy var root_view:UIView = {
       let control = UIView()
        control.backgroundColor = .white
        control.cornerRadius = 20
        return control
    }()
    
    fileprivate lazy var imageView:UIImageView = {
       
        let control = UIImageView()
        
        if ST_BTUserInfoManager.shared.current_account_info?.userinfo?.sex == ST_SEX.female{
            control.image = ST_ImageUtils.imageName("个人中心_img_扫描女生")
        }else{
            control.image = ST_ImageUtils.imageName("个人中心_img_扫描男生")
        }
        
        return control
    }()
    
    fileprivate lazy var sub_label:UILabel = {
       let label = UILabel()
       let attrString = NSMutableAttributedString(string: "正在对比你的面容记录…")
        let attr: [NSAttributedString.Key : Any] = [.font: UIFont.systemFont(ofSize: 14),.foregroundColor: UIColor(red: 0.38, green: 0.4, blue: 0.44, alpha: 1)]
       attrString.addAttributes(attr, range: NSRange(location: 0, length: attrString.length))
       label.attributedText = attrString
        return label
    }()
    
}
